import {onBeforeUnmount} from "vue";

export function useRemoveChart(echarts) {
    return new Promise((resolve, reject) => {
        try {

            onBeforeUnmount(() => {
                echarts.dispose()
            })

            resolve('success')
        } catch (error) {
            reject(error)
        }
    })
}
